package leetcode;
import java.util.Scanner;
public class Day1 {
    public static void main(String[] args) {
            Scanner in = new Scanner(System.in);
            // 注意 hasNext 和 hasNextLine 的区别
            while (in.hasNext()) { // 注意 while 处理多个 case
                float a = in.nextFloat();
                char b= in.next().charAt(0);
                int result=0;
                if(a>1){
                    result=20+(int) (a-1)/1+1;
                    if(b=='y'){
                        result+=5;
                        System.out.println(1111);
                    }else{
                        result+=0;
                    }
                }else{
                    result=20;
                    if(b=='y'){
                        result+=5;
                    }else{
                        result+=0;
                    }
                }
                System.out.println(result);
            }
        }

}
